﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace davejk.Minecraft.ServerWrapper.Game
{
    public class MinecraftPlayer
    {
        public MinecraftPlayer(string name, string ip, int port)
        {
            _name = name;
            _ip = ip;
            _port = port;
            //TODO: Check user's ban status and save it to _banned;
        }

        public override string ToString()
        {
            return _name;
        }

        #region Properties

        private string _name;
        private string _ip;
        private int _port;
        public string Name
        {
            get
            {
                return _name;
            }
        }
        public string Ip
        {
            get
            {
                return _ip;
            }
        }
        public int Port
        {
            get
            {
                return _port;
            }
        }
        public bool Op
        {
            get
            {
                return Utils.Ops.IsOp(Name);
            }
            set
            {
                //TODO: Support for adding/removing a user's op
            }
        }
        private BanStatus _banned;
        public BanStatus Banned
        {
            get
            {
                return _banned;
            }
            set
            {
                //TODO: Support for changing ban type, banning/unbanning
            }
        }

        #endregion

        public enum BanStatus
        {
            NotBanned,
            BannedByIp,
            BannedByName,
            SuperBanned
        }

    }
}
